package com.java.bank.exception;

public enum ErrorCode {

    UNAUTHORIZED(401, "未认证"),
    FORBIDDEN(403, "权限不足"),
    SIGNATURE_FAILED(403, "验签失败"),

    E_100101(100101, "请输入正确的用户名和密码"),
    E_100102(100102, "该用户不存在，请联系管理员!"),
    E_100103(100103, "用户名已存在!"),
    E_100104(1000104, "验证码输入错误!"),
    E_100105(1000105, "操作用户的模式非法!"),
    E_100106(1000106, "操作考试的模式非法!"),
    E_100107(1000107, "该用户状态被锁定，请联系管理员"),

    E_4001(401, "登录失效，请重新登录"),

    E_300001(300001, "发布新公告异常"),
    E_300002(300002, "修改公告异常"),

    E_400001(400001, "考试不存在"),

    E_500001(500001, "主单元不存在"),
    E_500002(500002, "试题类型数量为空"),
    E_500003(500003, "文件解析失败"),
    E_500004(50004,"试题数量不足" ),

    /**
     * 切面类错误
     */
    E_800001(800001, "目标方法返回null"),

    /**
     * 未知错误
     */
    UNKNOWN(9999, "未知错误，请联系管理员"),

    E_500011(500011, "上传文件为空"),
    E_500012(500012, "文件上传失败"),
    E_500016(500016, "图片加载失败，请检查文件是否存在"),
    E_500017(500017, "图片加载失败"),
    E_9001(9001,"验证码失效" ),

    E_90001(90001,"验证码错误" );


    private final int code;

    private final String desc;

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    ErrorCode(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }
}
